<template> 
	<view>
		<view class="evaluate_top">
			<view @click="dianji(item,index)" class="evaluate_top_list" v-for="(item,index) in data" :key="index"  :class="{checked:index==n}">
				{{item.title}}{{item.num}}
			</view>
		</view>
		<view class="evaluate_centent">
			<view class="evaluate_centent_list" v-for="(item,index) in list" :key="index">
				<view class="evaluate_centent_list_top">
					<view class="evaluate_centent_list_top_left">
						<image :src="item.img" mode=""></image>
						<text>{{item.name}}</text>
					</view>
					<view class="evaluate_centent_list_top_right">
						{{item.time}}
					</view>
				</view>
				<view class="evaluate_centent_list_center">
					<view class="">
						{{item.title}}
					</view>
					<view class="evaluate_centent_list_pic">
						<view v-for="(item1,index) in item.pic" :key="index">
							<image class="list_pic" :src="item1" mode=""></image>
						</view>
						
					</view>
						
				</view>
			</view>
		</view>
		<view class="product_fiexd">
			<view class="product_fiexd_lisy">
				<image src="/static/prodtct/dianpu.png" mode=""></image>
				<text>店铺</text>
			</view>
			<view class="product_fiexd_lisy">
				<image src="/static/prodtct/kefu.png" mode=""></image>
				<text>客服</text>
			</view>
			<view class="product_fiexd_lisy" @click="open(1)">
				<image src="/static/prodtct/cart.png" mode=""></image>
				<text>加购物车</text>
			</view>
			<view class="product_fiexd_button" @click="open(2)">
				立即购买
			</view>
		</view>
		
		<uni-popup ref="popup" type="bottom">
			
			<view class="popup_box">
				<view class="popup_box_top">
					<view class="popup_box_top_left">
						<image src="../../static/dating/public.png" mode=""></image>
					</view>
					<view class="popup_box_top_center">
						<view class="" style="color: red;">
							￥<text>69</text>
						</view>
						<view class="popup_box_top_center_guige">
							已选 灰色；M
						</view>
					</view>
					<view class="popup_box_top_right" @click="close">
						<image src="../../static/prodtct/cha.png" style="width: 30rpx;height: 30rpx;" mode=""></image>
					</view>
				</view>
				<view class="popup_box_guige">
					<view class="popup_box_guige_box" v-for="(item,index) in GUIGE" :key="index">
						<view class="popup_box_guige_box">
							{{item.title}}
						</view>
						<view class="popup_box_guige_box_list">
		
							<view class="popup_box_guige_for" @click="dianji(item1,index)" :class="{checked:index==n}" v-for="(item1,index) in item.sku" :key="index">
		
								<image :src="item1.ima" mode="" v-if="item1.ima!=''"></image>
								{{item1.color}}
							</view>
						</view>
		
					</view>
				</view>
				<view class="popup_number">
					<view class="popup_number_left">
					购买数量
					</view>
					<view class="popup_number_right">
					<yp-number-box :min="1" :max="9" v-model="number"  @change="changee"></yp-number-box>
					</view>
				</view>
				<view class="popup_number_queding" @click="queding">
					确定
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				number:'',
				GUIGE: [{
						title: "颜色",
						sku: [{
								color: '黑色黑色',
								ima: 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg'
							},
							{
								color: '白色',
								ima: 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg'
							},
							{
								color: '黑色',
								ima: 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg'
							}
						]
					},
					{
						title: "尺寸",
						sku: [{
								color: 'L',
								ima: ''
							},
							{
								color: 'M',
								ima: ''
							},
							{
								color: 'mL',
								ima: ''
							}
				
						],
						suanze:''
					}
				],
				n:0,
				data:[
					{
						title:'全部',
						num:'',
					},
					{
						title:'最新',
						num:'',
					},
					{
						title:'有图',
						num:'(20)',
					}
				],
				list:[
					{
						img:'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg',
						name:'鱼书',
						title:'薪聚客是一款小巧、好用的手机兼职APP，提供各种类型的任务用户选择，空闲时间，拿出手机做小任务，就能快速赚取零花钱',
						time:'2020-05-12 17:11',
						pic:[
							"https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg",
							"https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg",
							"https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg",
							"https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg",
						]
					},
					{
						img:'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg',
						name:'鱼书',
						title:'薪聚客是一款小巧、好用的手机兼职APP，提供各种类型的任务用户选择，空闲时间，拿出手机做小任务，就能快速赚取零花钱',
						time:'2020-05-12 17:11',
						pic:[
							"https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg",
							"https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg",
							"https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg",
							"https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg",
						]
					},
					{
						img:'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg',
						name:'鱼书',
						title:'薪聚客是一款小巧、好用的手机兼职APP，提供各种类型的任务用户选择，空闲时间，拿出手机做小任务，就能快速赚取零花钱',
						time:'2020-05-12 17:11',
						pic:[
							"https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg",
							"https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg",
							"https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg",
							"https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg",
						]
					},
					{
						img:'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg',
						name:'鱼书',
						title:'薪聚客是一款小巧、好用的手机兼职APP，提供各种类型的任务用户选择，空闲时间，拿出手机做小任务，就能快速赚取零花钱',
						time:'2020-05-12 17:11',
					},
					{
						img:'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3252521864,872614242&fm=26&gp=0.jpg',
						name:'鱼书',
						title:'薪聚客是一款小巧、好用的手机兼职APP，提供各种类型的任务用户选择，空闲时间，拿出手机做小任务，就能快速赚取零花钱',
						time:'2020-05-12 17:11',
					}
				]
			}
		},
		methods: {
			dianji(item1,index){
				this.n=index
				console.log(item1)
			},
			changee(e){
				console.log(e)
				let self=this
				self.number=e
			},
			open(e) {
				if(e==1){
					this.suanze=1 //购物车打开
				}else{
					this.suanze=2//立即购买打开
				}
				this.$refs.popup.open()
			},
			queding(){
				if(this.suanze==1){
					uni.showToast({
					    title: '加入购物车成功',
					    duration: 1000
					});
				}else{
					//去订单页
					uni.showToast({
					    title: '去订单页//未写',
					    duration: 1000
					});
				}
			},
			close() {
				this.$refs.popup.close()
			},
		}
	}
</script>

<style  lang="less">
page{
	box-sizing: border-box;
	background-color: #EFEFF4;
}
.evaluate_top{
	width: 750rpx;
	height: 100rpx;
	border-top: 1rpx solid #EEEDF4;
	background-color: white;
	display: flex;
	align-items: center; 
	padding-left: 30rpx;
	box-sizing: border-box;
	.evaluate_top_list{
		padding: 0 19rpx;
		height: 56rpx;
		background-color: #E5E5E5;
		margin-right: 20rpx;
		line-height: 56rpx;
		font-size:32rpx;
		font-family:PingFang SC;
		font-weight:400;
		color:rgba(51,51,51,1);
		box-sizing: border-box;
		border-radius:23px;
		text-align: center;
	}
}
.checked{
	background-color: #7322D8 !important;
	color: white !important; 
}
.evaluate_centent{
	margin-top: 10rpx;
	margin-bottom: 100rpx;
	.evaluate_centent_list{
		background-color: white;
		padding: 30rpx;
		margin-bottom: 10rpx;
		.evaluate_centent_list_top{
			display: flex;
			justify-content: space-between;
			align-items: center;
			.evaluate_centent_list_top_left{
				display: flex;
				align-items: center;
				image{
					width: 60rpx;
					height: 60rpx;
					margin-right: 20rpx;
				}
				text{
					font-size:28rpx;
					font-family:PingFang SC;
					font-weight:bold;
					color:rgba(51,51,51,1);
				}
			}
			.evaluate_centent_list_top_right{
				font-size:28rpx;
				font-family:PingFang SC;
				font-weight:400;
				color:rgba(46,46,46,1);
			}
		}
		.evaluate_centent_list_center{
			padding-left: 82rpx;
			box-sizing: border-box;
			font-size: 28rpx;
			color: #2E2E2E;
			.evaluate_centent_list_pic{
				display: flex;
				margin-top: 30rpx;
				display: flex;
				justify-content: space-between;
			}
			.list_pic{
				width:138rpx;
				height:138rpx;
				border-radius:10rpx;
			}
			
		}
	}
}
.product_fiexd {
		width: 750rpx;
		height: 100rpx;
		position: fixed;
		bottom: 0;
		background: rgba(255, 255, 255, 1);
		box-shadow: 0px -10rpx 18rpx 2rpx rgba(115, 34, 216, 0.1);
		color: #333333;
		font-size: 28rpx;
		padding-left: 30rpx;
		box-sizing: border-box;
		display: flex;
		align-items: center;

		.product_fiexd_lisy {
			display: flex;
			flex-direction: column;
			flex-wrap: wrap;
			margin-right: 60rpx;
			align-items: center;

			image {
				width: 40rpx;
				height: 36rpx;
			}
		}

		.product_fiexd_button {
			width: 300rpx;
			height: 80rpx;
			background: rgba(115, 34, 216, 1);
			border-radius: 20rpx;
			font-size: 38rpx;
			font-family: PingFang SC;
			font-weight: bold;
			color: rgba(255, 255, 255, 1);
			text-align: center;
			line-height: 80rpx;
		}
	}
.popup_box {
		width: 750rpx;
		height: 900rpx;
		background: rgba(255, 255, 255, 1);
		border-radius: 20rpx 20rpx 0px 0px;
		position: relative;
		padding: 30rpx;
		box-sizing: border-box;

		.popup_box_top {
			height: 145rpx;
			display: flex;
			margin-bottom: 40rpx;

			.popup_box_top_left {
				width: 145rpx;
				height: 145rpx;
				margin-right: 25rpx;

				image {
					width: 145rpx;
					height: 145rpx;
				}
			}

			.popup_box_top_center {
				width: 100%;
				padding-top: 28rpx;
				box-sizing: border-box;

				.popup_box_top_center_guige {
					font-size: 26rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: rgba(51, 51, 51, 1);
				}
			}
		}
	}

	.popup_box_guige_box {
		font-size: 34rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: rgba(51, 51, 51, 1);
		margin-top: 30rpx;

		.popup_box_guige_box_list {
			height: 60rpx;
			display: flex;
			margin-top: 30rpx;
			border-bottom: 1rpx solid #FFFFFF;
			padding-bottom: 30rpx;
			.popup_box_guige_for {
				height: 60rpx;
				border: 1rpx solid #EFEFF4;
				background: rgba(239, 239, 244, 1);
				border-radius: 10rpx;
				box-sizing: border-box;
				margin-right: 20rpx;
				display: flex;
				padding: 5rpx 20rpx;
				align-items: center;
				image {
					width: 50rpx;
					height: 50rpx;
				}
			}
		}
	}
	.popup_number{
		height: 100rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-bottom: 1rpx solid #E5E5E5;
		box-sizing: border-box;
		.popup_number_left{
			font-size: 30rpx;
			
		}
	}
	.popup_number_queding{
		width:680rpx;
		height:90rpx;
		background:rgba(115,34,216,1);
		box-shadow:0px 0px 18rpx 2rpx rgba(115,34,216,0.3);
		border-radius:20rpx;
		text-align: center;
		color: white;
		line-height: 90rpx;
		margin-top: 80rpx;
	}
	.checked{
		color: #7322D8;
		border: 1rpx solid #7322D8 !important;
	}
</style>
